package site.addzero.repl

import kotlinx.coroutines.runBlocking
import org.koin.core.annotation.Single
import site.addzero.app.AdvancedRepl
import site.addzero.app.ParamDef
import site.addzero.cli.config.Lines
import site.addzero.cli.config.configService
import site.addzero.cli.dotfiles.sync_stragty.SyncUtil
import site.addzero.cli.platform.runCmd
import site.addzero.cli.setting.SettingContext.DOTFILES_DIR
import site.addzero.cli.setting.SettingContext.HOME_DIR
import site.addzero.cli.setting.SettingContext.absParamDescription
import site.addzero.util.AddFileUtil
import site.addzero.util.KoinInjector.inject
import site.addzero.util.SourcePathResolver
import site.addzero.util.StatusPrinter
import site.addzero.util.TargetPathResolver
import kotlin.reflect.typeOf


/**
 * AddCommand的REPL包装类，实现AdvancedRepl接口
 */
@Single
class KejiRepl : AdvancedRepl<Unit, Unit> {
    override val command: String = "add-dotfiles"
    override val description: String
        get() = "keji面板（仅适用于unix系统）"
    override val paramDefs: List<ParamDef>
        get() = emptyList<ParamDef>()


    override fun eval(params: Unit): Unit = runBlocking {
        "bash <(curl -sL kejilion.sh)".runCmd()
    }

//    override fun createParams(values: List<Any?>) {
//    }
}
